package main

import "fmt"

type Student struct {
	Name  string
	Age   int
	Score int
}

func (s *Student) SetScore(score int) {
	s.Score = score
}
func (s *Student) ShowInfo() {
	fmt.Printf("%s::%d\n", s.Name, s.Age)
}
func (s *Student) testing() {
	fmt.Printf("student")
}

type Pupil struct {
	Student
	Age int
}

func (p *Pupil) testing() {
	fmt.Println("pupil")
}

func main() {
	s := &Pupil{}
	s.Name = "student"
	s.Student.Age = 12
	fmt.Println(s)
	s.ShowInfo()
}
